module Provider

  class AbstractProvider

    @sms_sender

    def initialize(sms_sender)
      @sms_sender = sms_sender

      # uncomment the following to get login_name, password and/or own_number from the settings on initialization
      #@login_name = @sms_sender.get_main.login_name
      #@password = @sms_sender.get_main.password
      #@own_number = @sms_sender.get_main.own_number

    end

    def send(to, text)
      #do sms sending magic here
    end

    # uncomment the following if it's possible to implement it
    #def sms_left #returns number of sms left to send for account
    #end

    def sms_sent #call this to inform GUI about successful sending of sms
      @sms_sender.sms_sent
    end

    def sms_not_sent(reason) #call this to inform GUI about unsuccessful sending of sms
      @sms_sender.sms_not_sent(reason)
    end

  end
end
